﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

using Microsoft.Practices.EnterpriseLibrary.Logging;
using System.Data.SqlClient;
using System.Data.Common;
namespace EntLibFluentWeb
{
    public partial class WebForm1 : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
               SqlConnection bogusConnection = new SqlConnection("Data Source=localhost;Initial Catalog=myDataBase;User Id=myUsername;Password=myPassword;Connection Timeout=1");
                bogusConnection.Open();
            }
            catch (Exception ex)
            {
                LogX.Error.Catch(ex).Write("You should always give a good log messsge about what went wrong and how to fix it");
            }
        }

        
    }
}